//
//  NormalTableViewCell.m
//  ProjectA_V0.1
//
//  Created by liuchang on 14/12/31.
//  Copyright (c) 2014年 liuchang. All rights reserved.
//

#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

#import "NormalTableViewCell.h"

@implementation NormalTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UIImageView * upView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, SCREEN_WIDTH - 10, 90)];
        [upView setImage:[UIImage imageNamed:@"cell background"]];
        UIImageView * clockImageView = [[UIImageView alloc] initWithFrame:CGRectMake(12.36f, 15.28f, 50, 50)];
        [clockImageView setImage:[UIImage imageNamed:@"alart Icon"]];
        [upView addSubview:clockImageView];
        [clockImageView release];
        
        self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(62.36f, 2.81, 100, 50)];
        [_timeLabel setText:@"12:23"];
        [_timeLabel setFont:[UIFont systemFontOfSize:40]];
        [upView addSubview:_timeLabel];
//        [_timeLabel setBackgroundColor:[UIColor grayColor]];
        [_timeLabel release];
        
        self.stateSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 66.28, 15.28, 51, 31)];
        [upView addSubview:_stateSwitch];
        [_stateSwitch release];
        
        [self.contentView addSubview:upView];
        [upView release];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
